home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 05.zip / BS1 part 5 / Ami-Back.adf / Install Ami-Back < prev    next >
Text File  |  1992-08-07  |  4KB  |  181 lines

  1. ;script to install Ami-Back
  2.  
  3. (complete 0)
  4.  
  5. ;Delete old config file.
  6. (if (exists "S:Ami-Back.config") 
  7.     (delete "S:Ami-Back.config" 
  8.         (prompt "Do you want to delete your old (incompatible) config files?")
  9.         (confirm 2)
  10.         (help "Unless you plan to continue using the old version of Ami-Back " 
  11.               "you should delete your old configuration files since they are not "
  12.               "compatible with the new version."
  13.         )
  14.     )
  15. )
  16.  
  17. ;Get directory to install Ami-Back in.
  18. (set destdir 
  19.     (askdir 
  20.         (prompt "In which drawer should Ami-Back be installed?") 
  21.         (help @askdir-help)
  22.         (default (tackon @default-dest "Ami-Back"))
  23.     )
  24. )
  25.  
  26. (set vernum (getversion))
  27. (set ver (/ vernum 65536))
  28. (set rev (- vernum (* ver 65536) ) )
  29.  
  30. ;Get version of Ami-Back that sould be installed
  31. (if (> @user-level 1)
  32.  (
  33.     (set abversion
  34.         (askchoice
  35.             (prompt "Which version of Ami-Back should be installed\n")
  36.             (choices "1.3 Version" "2.0 Version")
  37.             (default (> ver 36))
  38.             (help "The 1.3 version of Ami-Back will run under WB 1.3 or WB 2.0. "
  39.                   "The 2.0 version supports the additional features of WB 2.0 such "
  40.                   "as links and faster directory scanning."
  41.             )
  42.         )
  43.     )
  44.     
  45.     (if (> abversion 0)
  46.       (
  47.         (set ver 37)
  48.       )
  49.       (
  50.         (set ver 34)
  51.       )
  52.     )
  53.  )
  54. )
  55.  
  56. (complete 10)
  57.  
  58. ;Determine system version.
  59. (if (> ver 36)
  60.     (
  61.         (message "Install WorkBench 2.x version")
  62.         (set abprog "Ami-Back:Ami-Back2.0")
  63.         (copylib 
  64.             (source "Ami-Back:Libs2.0/AmigaGuide.library")
  65.             (dest "LIBS:")
  66.             
  67.         )
  68.         (copyfiles 
  69.         
  70.             (source "Ami-Back:S")
  71.             (dest "S:")
  72.             (all)
  73.         )
  74.         (set poffset 213550)
  75.         (set abversion 1)
  76.     )
  77.     (
  78.         (message "Install WorkBench 1.x version")
  79.         (set abprog "Ami-Back:Ami-Back1.3")
  80.         (copylib 
  81.             (source "Ami-Back:Libs1.3/gadtools13.library")
  82.             (dest "LIBS:")
  83.         )
  84.         (copylib 
  85.             (source "Ami-Back:Libs1.3/asl13.library")
  86.             (dest "LIBS:")
  87.         )
  88.         (set poffset 216290)
  89.         (set abversion 0)
  90.     )
  91. )
  92.  
  93. (complete 40)
  94.  
  95. ;Copy program files to destination.
  96. (copyfiles
  97.     (source abprog)
  98.     (dest destdir)
  99.     (all)
  100. )
  101.  
  102. (complete 90)
  103.  
  104. ;Personalize Ami-Back.
  105.  
  106. (set tryperson 1)
  107. (set @user-level 1)
  108.  
  109. (while tryperson
  110.  
  111. (if (exists "RAM:Personalization.Error")
  112.     (delete "RAM:Personalization.Error")
  113. )
  114.  
  115. (if (> abversion 0)
  116.     (
  117.     (run "Ami-Back:C/Person"
  118.         ('\"%s\"'            ;Need to quote filename argument.
  119.             (tackon destdir "Ami-Back20")
  120.         )    
  121.  
  122.         ('\"%s\"'            ;Need to quote name argument.
  123.             (askstring 
  124.                 (prompt "What is your name?") 
  125.                 (help "You must enter your name or company name so that your copy of Ami-Back can be personalized.")
  126.             )
  127.         )
  128.         
  129.         (askstring
  130.             (prompt "What is your serial number?") 
  131.             (help "You can find your serial number on the front of you Ami-Back master disk.")
  132.         )
  133.         
  134.         poffset
  135.     )
  136.     )
  137.     
  138.     (
  139.     (run "Ami-Back:C/Person"
  140.         ('\"%s\"'            ;Need to quote filename argument.
  141.             (tackon destdir "Ami-Back13")
  142.         )    
  143.  
  144.         ('\"%s\"'            ;Need to quote name argument.
  145.             (askstring 
  146.                 (prompt "What is your name?") 
  147.                 (help "You must enter your name or company name so that your copy of Ami-Back can be personalized.")
  148.             )
  149.         )
  150.         
  151.         (askstring
  152.             (prompt "What is your serial number?") 
  153.             (help "You can find your serial number on the front of you Ami-Back master disk.")
  154.         )
  155.         
  156.         poffset
  157.     )
  158.     )
  159. )
  160.  
  161. (set tryperson 0)
  162.  
  163. (if (exists "RAM:Personalization.Error")
  164.     (if
  165.         (askbool 
  166.             (prompt "The personalization program failed (probably due to an incorrect serial number) would you like to try again?")
  167.             (help "You can find more information about the error in the file \"RAM:Personalization.Error\"")
  168.         )
  169.         (set tryperson 1)
  170.         (abort "Personalization failed.")
  171.     )
  172. )
  173. )
  174.  
  175. ;Correct @default-dest so that final information is correct.
  176. (set @default-dest destdir)
  177.  
  178. (complete 100)
  179.  
  180. (exit)
  181.